<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkRadioMenuItem: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
<link rel="prev" href="GtkMenuItem.html" title="GtkMenuItem">
<link rel="next" href="GtkCheckMenuItem.html" title="GtkCheckMenuItem">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkRadioMenuItem.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkRadioMenuItem.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
                  <a href="#GtkRadioMenuItem.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GtkRadioMenuItem.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GtkRadioMenuItem.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="MenusAndCombos.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkMenuItem.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkCheckMenuItem.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkRadioMenuItem"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkRadioMenuItem.top_of_page"></a>GtkRadioMenuItem</span></h2>
<p>GtkRadioMenuItem — A choice from multiple check menu items</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkRadioMenuItem.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-new" title="gtk_radio_menu_item_new ()">gtk_radio_menu_item_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-new-with-label" title="gtk_radio_menu_item_new_with_label ()">gtk_radio_menu_item_new_with_label</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-new-with-mnemonic" title="gtk_radio_menu_item_new_with_mnemonic ()">gtk_radio_menu_item_new_with_mnemonic</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-new-from-widget" title="gtk_radio_menu_item_new_from_widget ()">gtk_radio_menu_item_new_from_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-new-with-label-from-widget" title="gtk_radio_menu_item_new_with_label_from_widget ()">gtk_radio_menu_item_new_with_label_from_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-new-with-mnemonic-from-widget" title="gtk_radio_menu_item_new_with_mnemonic_from_widget ()">gtk_radio_menu_item_new_with_mnemonic_from_widget</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-set-group" title="gtk_radio_menu_item_set_group ()">gtk_radio_menu_item_set_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GSList</span> *
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-get-group" title="gtk_radio_menu_item_get_group ()">gtk_radio_menu_item_get_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-join-group" title="gtk_radio_menu_item_join_group ()">gtk_radio_menu_item_join_group</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody><tr>
<td class="property_type">
<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *</td>
<td class="property_name"><a class="link" href="GtkRadioMenuItem.html#GtkRadioMenuItem--group" title="The “group” property">group</a></td>
<td class="property_flags">Write</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody><tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkRadioMenuItem.html#GtkRadioMenuItem-group-changed" title="The “group-changed” signal">group-changed</a></td>
<td class="signal_flags">Run First</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkRadioMenuItem.html#GtkRadioMenuItem-struct" title="struct GtkRadioMenuItem">GtkRadioMenuItem</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GInitiallyUnowned
        <span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
            <span class="lineart">╰──</span> <a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
                <span class="lineart">╰──</span> <a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
                    <span class="lineart">╰──</span> <a class="link" href="GtkMenuItem.html" title="GtkMenuItem">GtkMenuItem</a>
                        <span class="lineart">╰──</span> <a class="link" href="GtkCheckMenuItem.html" title="GtkCheckMenuItem">GtkCheckMenuItem</a>
                            <span class="lineart">╰──</span> GtkRadioMenuItem
</pre>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkRadioMenuItem implements
 AtkImplementorIface,  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>,  <a class="link" href="GtkActivatable.html" title="GtkActivatable">GtkActivatable</a> and  <a class="link" href="GtkActionable.html" title="GtkActionable">GtkActionable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.description"></a><h2>Description</h2>
<p>A radio menu item is a check menu item that belongs to a group. At each
instant exactly one of the radio menu items from a group is selected.</p>
<p>The group list does not need to be freed, as each <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> will
remove itself and its list item when it is destroyed.</p>
<p>The correct way to create a group of radio menu items is approximatively
this:</p>
<div class="refsect3">
<a name="id-1.3.13.7.10.5"></a><h4>How to create a group of radio menu items.</h4>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">GSList</span> <span class="o">*</span><span class="n">group</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>
<span class="n">GtkWidget</span> <span class="o">*</span><span class="n">item</span><span class="p">;</span>
<span class="n">gint</span> <span class="n">i</span><span class="p">;</span>

<span class="k">for</span> <span class="p">(</span><span class="n">i</span> <span class="o">=</span> <span class="mi">0</span><span class="p">;</span> <span class="n">i</span> <span class="o">&lt;</span> <span class="mi">5</span><span class="p">;</span> <span class="n">i</span><span class="o">++</span><span class="p">)</span>
<span class="p">{</span>
  <span class="n">item</span> <span class="o">=</span> <span class="n">gtk_radio_menu_item_new_with_label</span> <span class="p">(</span><span class="n">group</span><span class="p">,</span> <span class="s">&quot;This is an example&quot;</span><span class="p">);</span>
  <span class="n">group</span> <span class="o">=</span> <span class="n">gtk_radio_menu_item_get_group</span> <span class="p">(</span><span class="n">GTK_RADIO_MENU_ITEM</span> <span class="p">(</span><span class="n">item</span><span class="p">));</span>
  <span class="k">if</span> <span class="p">(</span><span class="n">i</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span>
    <span class="n">gtk_check_menu_item_set_active</span> <span class="p">(</span><span class="n">GTK_CHECK_MENU_ITEM</span> <span class="p">(</span><span class="n">item</span><span class="p">),</span> <span class="n">TRUE</span><span class="p">);</span>
<span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
</div>
<div class="refsect2">
<a name="id-1.3.13.7.10.6"></a><h3>CSS nodes</h3>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">menuitem</span>
<span class="err">├──</span> <span class="n">radio</span><span class="p">.</span><span class="n">left</span>
<span class="err">╰──</span> <span class="o">&lt;</span><span class="n">child</span><span class="o">&gt;</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>GtkRadioMenuItem has a main CSS node with name menuitem, and a subnode
with name radio, which gets the .left or .right style class.</p>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-radio-menu-item-new"></a><h3>gtk_radio_menu_item_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_radio_menu_item_new (<em class="parameter"><code><span class="type">GSList</span> *group</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>.</p>
<div class="refsect3">
<a name="gtk-radio-menu-item-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>group</p></td>
<td class="parameter_description"><p>the group to which the
radio menu item is to be attached, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkRadioMenuItem][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-radio-menu-item-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-new-with-label"></a><h3>gtk_radio_menu_item_new_with_label ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_radio_menu_item_new_with_label (<em class="parameter"><code><span class="type">GSList</span> *group</code></em>,
                                    <em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> whose child is a simple <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>.</p>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-label.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>group</p></td>
<td class="parameter_description"><p>group the radio menu item is inside, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkRadioMenuItem][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p>the text for the label</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-label.returns"></a><h4>Returns</h4>
<p>A new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-new-with-mnemonic"></a><h3>gtk_radio_menu_item_new_with_mnemonic ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_radio_menu_item_new_with_mnemonic (<em class="parameter"><code><span class="type">GSList</span> *group</code></em>,
                                       <em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> containing a label. The label
will be created using <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="gtk_label_new_with_mnemonic ()"><code class="function">gtk_label_new_with_mnemonic()</code></a>, so underscores
in <em class="parameter"><code>label</code></em>
 indicate the mnemonic for the menu item.</p>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-mnemonic.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>group</p></td>
<td class="parameter_description"><p>group the radio menu item is inside, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkRadioMenuItem][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p>the text of the button, with an underscore in front of the
mnemonic character</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-mnemonic.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-new-from-widget"></a><h3>gtk_radio_menu_item_new_from_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_radio_menu_item_new_from_widget (<em class="parameter"><code><a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *group</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> adding it to the same group as <em class="parameter"><code>group</code></em>
.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-from-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>group</p></td>
<td class="parameter_description"><p>An existing <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-from-widget.returns"></a><h4>Returns</h4>
<p>The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-new-with-label-from-widget"></a><h3>gtk_radio_menu_item_new_with_label_from_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_radio_menu_item_new_with_label_from_widget
                               (<em class="parameter"><code><a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *group</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
<p>Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.
The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> is added to the same group as <em class="parameter"><code>group</code></em>
.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-label-from-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>group</p></td>
<td class="parameter_description"><p>an existing <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p>the text for the label. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-label-from-widget.returns"></a><h4>Returns</h4>
<p>The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-new-with-mnemonic-from-widget"></a><h3>gtk_radio_menu_item_new_with_mnemonic_from_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_radio_menu_item_new_with_mnemonic_from_widget
                               (<em class="parameter"><code><a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *group</code></em>,
                                <em class="parameter"><code>const <span class="type">gchar</span> *label</code></em>);</pre>
<p>Creates a new GtkRadioMenuItem containing a label. The label will be
created using <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="gtk_label_new_with_mnemonic ()"><code class="function">gtk_label_new_with_mnemonic()</code></a>, so underscores in label
indicate the mnemonic for the menu item.</p>
<p>The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> is added to the same group as <em class="parameter"><code>group</code></em>
.</p>
<p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-mnemonic-from-widget.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>group</p></td>
<td class="parameter_description"><p>An existing <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>label</p></td>
<td class="parameter_description"><p>the text of the button, with an underscore in front of the
mnemonic character. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-radio-menu-item-new-with-mnemonic-from-widget.returns"></a><h4>Returns</h4>
<p>The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-set-group"></a><h3>gtk_radio_menu_item_set_group ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_radio_menu_item_set_group (<em class="parameter"><code><a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *radio_menu_item</code></em>,
                               <em class="parameter"><code><span class="type">GSList</span> *group</code></em>);</pre>
<p>Sets the group of a radio menu item, or changes it.</p>
<div class="refsect3">
<a name="gtk-radio-menu-item-set-group.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>radio_menu_item</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>group</p></td>
<td class="parameter_description"><p>the new group, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkRadioMenuItem][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-get-group"></a><h3>gtk_radio_menu_item_get_group ()</h3>
<pre class="programlisting"><span class="returnvalue">GSList</span> *
gtk_radio_menu_item_get_group (<em class="parameter"><code><a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *radio_menu_item</code></em>);</pre>
<p>Returns the group to which the radio menu item belongs, as a <span class="type">GList</span> of
<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. The list belongs to GTK+ and should not be freed.</p>
<div class="refsect3">
<a name="gtk-radio-menu-item-get-group.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>radio_menu_item</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-radio-menu-item-get-group.returns"></a><h4>Returns</h4>
<p>the group
of <em class="parameter"><code>radio_menu_item</code></em>
. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkRadioMenuItem][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-menu-item-join-group"></a><h3>gtk_radio_menu_item_join_group ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_radio_menu_item_join_group (<em class="parameter"><code><a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *radio_menu_item</code></em>,
                                <em class="parameter"><code><a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *group_source</code></em>);</pre>
<p>Joins a <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> object to the group of another <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>
object.</p>
<p>This function should be used by language bindings to avoid the memory
manangement of the opaque <span class="type">GSList</span> of <a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-get-group" title="gtk_radio_menu_item_get_group ()"><code class="function">gtk_radio_menu_item_get_group()</code></a>
and <a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-set-group" title="gtk_radio_menu_item_set_group ()"><code class="function">gtk_radio_menu_item_set_group()</code></a>.</p>
<p>A common way to set up a group of <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> instances is:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="n">GtkRadioMenuItem</span> <span class="o">*</span><span class="n">last_item</span> <span class="o">=</span> <span class="nb">NULL</span><span class="p">;</span>

<span class="k">while</span> <span class="p">(</span> <span class="p">...</span><span class="n">more</span> <span class="n">items</span> <span class="n">to</span> <span class="n">add</span><span class="p">...</span> <span class="p">)</span>
  <span class="p">{</span>
    <span class="n">GtkRadioMenuItem</span> <span class="o">*</span><span class="n">radio_item</span><span class="p">;</span>

    <span class="n">radio_item</span> <span class="o">=</span> <span class="n">gtk_radio_menu_item_new</span> <span class="p">(...);</span>

    <span class="n">gtk_radio_menu_item_join_group</span> <span class="p">(</span><span class="n">radio_item</span><span class="p">,</span> <span class="n">last_item</span><span class="p">);</span>
    <span class="n">last_item</span> <span class="o">=</span> <span class="n">radio_item</span><span class="p">;</span>
  <span class="p">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<div class="refsect3">
<a name="gtk-radio-menu-item-join-group.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>radio_menu_item</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>group_source</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> whose group we are
joining, or <code class="literal">NULL</code> to remove the <em class="parameter"><code>radio_menu_item</code></em>
from its current
group. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-3-18.html#api-index-3.18">3.18</a></p>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkRadioMenuItem-struct"></a><h3>struct GtkRadioMenuItem</h3>
<pre class="programlisting">struct GtkRadioMenuItem;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkRadioMenuItem--group"></a><h3>The <code class="literal">“group”</code> property</h3>
<pre class="programlisting">  “group”                    <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *</pre>
<p>The radio menu item whose group this widget belongs to.</p>
<p>Owner: GtkRadioMenuItem</p>
<p>Flags: Write</p>
<p class="since">Since: 2.8</p>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkRadioMenuItem-group-changed"></a><h3>The <code class="literal">“group-changed”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> *radiomenuitem,
               <span class="type">gpointer</span>          user_data)</pre>
<p>Flags: Run First</p>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioMenuItem.see-also"></a><h2>See Also</h2>
<p><a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a>, <a class="link" href="GtkCheckMenuItem.html" title="GtkCheckMenuItem"><span class="type">GtkCheckMenuItem</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>